"use strict";
// 定义一个类
var Stu = /** @class */ (function () {
    // 构造函数
    function Stu(name) {
        this.code = "1000";
        this.name = "张三";
        this.name = name;
    }
    // 定义方法
    Stu.prototype.ask = function () {
        console.log(this.code, this.name);
    };
    Stu.prototype.ask2 = function () {
        this.ask();
    };
    return Stu;
}());
// 类的调用
var s1 = new Stu("王小明");
s1.ask2();
s1.name;
